import requests


def get_metabase_cookie():
    url = f"http://metabase.vrviu.com/api/session"
    data = {"password": "Yf137422033@", "username": "frank.yan@cloudsky.com", "remember": True}
    resp = requests.post(url=url, json=data)
    if resp.status_code != 200:
        raise Exception("状态码不对")
    session_id = resp.json().get('id')
    return session_id



if __name__ == '__main__':
    print(get_metabase_cookie())
